Xbasic
nodeservices::firestorequery Method
Syntax
<firestore>.query(securityKeyfilename as c, databaseURL as c, collectionName as c, query as c)
Returns
- result
List of documents
Description
Return a list of documents, which can be filtered based on optional criteria.
Example
dim fs as nodeservices::firestore ? json_reformat( fs.query("c:/data/serviceAccount.json","https://my-application.firebaseio.com","Customers","{ \"where\" : [ \"Country\" , \"==\" , \"Mexico\"] , \"limit\" : 2 }")) = [ { "key": "ANATR", "data": { "ContactName": "Ana Trujillo", "CustomerID": "ANATR", "Country": "Mexico", "ContactTitle": "Owner", "Phone": "(5) 555-4729", "Fax": "(5) 555-3745", "Region": null, "City": "Mexico D.F.", "CompanyName": "Ana Trujillo Emparedados y helados", "PostalCode": "05021" } },